﻿using System.Windows;
using System.Windows.Media.Media3D;

namespace Brjnk.CoordinateSystem2D.Layers
{
    public struct GraphPoint
    {
        private Point3D position;

        public Point3D Pos
        {
            get { return position; }
            set { position = value; }
        }

        public GraphPoint(System.Windows.Point point)
            : this()
        {
            position = new Point3D(point.X, point.Y, position.Z);
        }

        public GraphPoint(Point point2D, double zValue, object data)
            : this()
        {
            Pos = new Point3D(point2D.X, point2D.Y, zValue);
            this.DataObject = data;
        }

        //        public GraphPoint Update(System.Windows.Point point, double z)
        //{
        //    var retVal = new GraphPoint(point);
        //    var pos = new Point3D(point.X, point.Y, z);
        //    position = pos;
        //    retVal.Interrupt = this.Interrupt;
        //    return retVal;
        //}

        public Point AsPoint()
        {
            return new Point(this.Pos.X, this.Pos.Y);
        }

        public bool Interrupt { get; set; }

        public object DataObject { get; set; }
    }
}